package com.ddddddl.zhangben.logic;

import java.util.HashMap;
import java.util.Map;

public class ExecuteMessage {
	
	public int type;
	
	public Observer observer;
	
	public Map<String, Object> datas;

	public ExecuteMessage(int type) {
		super();
		this.type = type;
		datas = new HashMap<String, Object>();
	}

	public void put(String key, Object value) {
		datas.put(key, value);
	}
	
	public Object get(String key) {
		return datas.get(key);
	}
	
	public void putString(String key, String value) {
		datas.put(key, value);
	}
	
	public String getString(String key) {
		Object o = datas.get(key);
		if (o instanceof String) 
			return (String) o;
		else 
			return null;
		
	}
}
